#!/bin/bash

fwinit="fwinit"

echo "Compiling boot Script"

fwdir=`pwd`
fwinit_skeleton="fwinit_skeleton"

sed -e "s|DEFAULT_PATH=|DEFAULT_PATH=$fwdir|"  $fwinit_skeleton  > $fwinit

echo Done

echo "Setting System Environment"
cp -f ./$fwinit  /etc/init.d/$fwinit
chmod 755  /etc/init.d/$fwinit


pushd /etc/init.d
update-rc.d $fwinit defaults 99
popd

echo Done.
